package com.tansun.easycare.rule.ml.algorithm.entity;

import java.util.ArrayList;
import java.util.List;

import com.tansun.easycare.rule.ml.model.entity.MlDataModel;

/**
 * pyhton服务请求Entity
 * @author xch
 * @version 2018-08-23
 */
public class PyRequest {
	
	private MlDataModelVO mlDataModelVO;			// 模型id，唯一
	private List<MlDataModelVO> mlDataModelVOList;			// 模型id，唯一
	private String operate;			// 操作，包括模型创建，数据导入，获取数据等一系列业务操作
	private AlogrithmVariables alogrithmVariables;	// 算法参数
	private DataVariableList dataVariables;	// 数据参数
	private ImgVariables imgVariables;	//图形参数
	private ApplyData applyData; //引用数据
	private Object dataSet;			// 数据集
	private String auth;			//验证码
	private String tableName;			//表名
	private String currentSite;		//当前流程位置
	private DatabaseConn databaseConn;
	private StockVariables stockVariables;//股票数据
	private TicketVariables ticketVariables;//彩票数据
	private MuntiTables muntiTables;//多组表格
	private FormulaDict formulaDict;//公式字典
	private String dataSetFile;
	
	public PyRequest() {
		
	}

	public PyRequest(String operate) {
		this.operate = operate;
	}
	
	public PyRequest(MlDataModel mlDataModel){
		this.mlDataModelVO = MlDataModelVO.newInstance(mlDataModel);
	}

	public PyRequest(MlDataModel mlDataModel,String operate){
		this.mlDataModelVO = MlDataModelVO.newInstance(mlDataModel);
		this.operate = operate;
	}
	public PyRequest(List<MlDataModel> mlDataModelList,String operate){
		this.mlDataModelVOList = new ArrayList<MlDataModelVO>();
		for(MlDataModel mlDataModel:mlDataModelList){
			if (this.mlDataModelVO == null){
				this.mlDataModelVO = MlDataModelVO.newInstance(mlDataModel);
			}
			this.mlDataModelVOList.add(MlDataModelVO.newInstance(mlDataModel));
		}
		this.operate = operate;
	}
	
	public PyRequest(MlDataModel mlDataModel,DatabaseConn databaseConn,String operate){
		this.mlDataModelVO = MlDataModelVO.newInstance(mlDataModel);
		this.databaseConn = databaseConn;
		this.operate = operate;
	}
	
	public PyRequest(MlDataModel mlDataModel,MuntiTables muntiTables,String operate){
		this.mlDataModelVO = MlDataModelVO.newInstance(mlDataModel);
		this.muntiTables = muntiTables;
		this.operate = operate;
	}
	public PyRequest(MlDataModel mlDataModel, FormulaDict formulaDict,String operate){
		this.mlDataModelVO = MlDataModelVO.newInstance(mlDataModel);
		this.formulaDict = formulaDict;
		this.operate = operate;
	}
	
	public PyRequest(MlDataModel mlDataModel,StockVariables stockVariables,String operate){
		this.mlDataModelVO = MlDataModelVO.newInstance(mlDataModel);
		this.stockVariables = stockVariables;
		this.operate = operate;
	}
	
	public PyRequest(MlDataModel mlDataModel,TicketVariables ticketVariables,String operate){
		this.mlDataModelVO = MlDataModelVO.newInstance(mlDataModel);
		this.ticketVariables = ticketVariables;
		this.operate = operate;
	}
	
	public PyRequest(MlDataModel mlDataModel,String currentSite,String operate){
		super();
		this.mlDataModelVO = MlDataModelVO.newInstance(mlDataModel);
		this.currentSite = currentSite;
		this.operate = operate;
	}
	
	public PyRequest(MlDataModel mlDataModel,AlogrithmVariables alogrithmVariables,String operate){
		super();
		this.mlDataModelVO = MlDataModelVO.newInstance(mlDataModel);
		this.alogrithmVariables = alogrithmVariables;
		this.operate = operate;
	}
	
	public PyRequest(MlDataModel mlDataModel,ApplyData applyData,ImgVariables imgVariables, String operate) {
		super();
		this.mlDataModelVO = MlDataModelVO.newInstance(mlDataModel);
		this.imgVariables = imgVariables;
		this.operate = operate;
		this.applyData = applyData;
	}

	public PyRequest(MlDataModel mlDataModel, ImgVariables imgVariables, String operate) {
		super();
		this.mlDataModelVO = MlDataModelVO.newInstance(mlDataModel);
		this.imgVariables = imgVariables;
		this.operate = operate;
	}

	public PyRequest(MlDataModel mlDataModel, DataVariableList dataVariables, String operate) {
		super();
		this.mlDataModelVO = MlDataModelVO.newInstance(mlDataModel);
		this.operate = operate;
		this.dataVariables = dataVariables;
	}

	public PyRequest(int modelId, String operate) {
		super();
		this.mlDataModelVO = new MlDataModelVO(modelId);
		this.operate = operate;
	}

	public PyRequest(int modelId, String algorithm,String operate) {
		super();
		this.mlDataModelVO = new MlDataModelVO(modelId,algorithm);
		this.operate = operate;
	}

	public DataVariableList getDataVariables() {
		return dataVariables;
	}

	public StockVariables getStockVariables() {
		return stockVariables;
	}

	public void setStockVariables(StockVariables stockVariables) {
		this.stockVariables = stockVariables;
	}

	public void setDataVariables(DataVariableList dataVariables) {
		this.dataVariables = dataVariables;
	}

	public MlDataModelVO getMlDataModelVO() {
		return mlDataModelVO;
	}

	public void setMlDataModelVO(MlDataModelVO mlDataModel) {
		this.mlDataModelVO = mlDataModel;
	}

	public String getOperate() {
		return operate;
	}

	public void setOperate(String operate) {
		this.operate = operate;
	}

	public Object getDataSet() {
		return dataSet; 
	}

	public void setDataSet(Object dataSet) {
		this.dataSet = dataSet;
	}

	public String getAuth() {
		return auth;
	}

	public void setAuth(String auth) {
		this.auth = auth;
	}

	public AlogrithmVariables getAlogrithmVariables() {
		return alogrithmVariables;
	}

	public void setAlogrithmVariables(AlogrithmVariables alogrithmVariables) {
		this.alogrithmVariables = alogrithmVariables;
	}

	public ImgVariables getImgVariables() {
		return imgVariables;
	}

	public void setImgVariables(ImgVariables imgVariables) {
		this.imgVariables = imgVariables;
	}

	public ApplyData getApplyData() {
		return applyData;
	}

	public void setApplyData(ApplyData applyData) {
		this.applyData = applyData;
	}

	public String getCurrentSite() {
		return currentSite;
	}

	public void setCurrentSite(String currentSite) {
		this.currentSite = currentSite;
	}

	public DatabaseConn getDatabaseConn() {
		return databaseConn;
	}

	public void setDatabaseConn(DatabaseConn databaseConn) {
		this.databaseConn = databaseConn;
	}

	
	public TicketVariables getTicketVariables() {
		return ticketVariables;
	}

	public void setTicketVariables(TicketVariables ticketVariables) {
		this.ticketVariables = ticketVariables;
	}

	public List<MlDataModelVO> getMlDataModelVOList() {
		return mlDataModelVOList;
	}

	public void setMlDataModelVOList(List<MlDataModelVO> mlDataModelVOList) {
		this.mlDataModelVOList = mlDataModelVOList;
	}

	public String getTableName() {
		return tableName;
	}

	public void setTableName(String tableName) {
		this.tableName = tableName;
	}

	public MuntiTables getMuntiTables() {
		return muntiTables;
	}

	public void setMuntiTables(MuntiTables muntiTables) {
		this.muntiTables = muntiTables;
	}

	public FormulaDict getFormulaDict() {
		return formulaDict;
	}

	public void setFormulaDict(FormulaDict formulaDict) {
		this.formulaDict = formulaDict;
	}

	public String getDataSetFile() {
		return dataSetFile;
	}

	public void setDataSetFile(String dataSetFile) {
		this.dataSetFile = dataSetFile;
	}

	
}